<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8">
    <title>Retina Dashboard</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="robots" content="" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="/static/css/style.css" media="all" />

    <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="/static/js/jquery.wysiwyg.js"></script>
    <script src="/static/js/jquery.checkbox.min.js"></script>

    <script src="/static/js/jquery.tablesorter.min.js"></script>
    <!--<script src="http://Code.highcharts.com/highcharts.js"></script>-->
    <!--<script src="jquery-1.11.2.js"></script>-->

    <style type="text/css">


    </style>
</head>
<body>
<div class="testing">
    <header class="main">
        <h1><strong>Retina</strong> Dashboard</h1>
        <!--<input type="text" value="search" />-->
    </header>
    <section class="user">
        <div class="profile-img">
            <img src="/static/images/uiface2.png" alt="" height="40" width="40" /> Welcome back John Doe
        </div>
        <div class="buttons">
            <span class="button blue"><a href="/admin/login_out/{{.tel}}">登出</a></span>
        </div>
    </section>
</div>
<nav>          <!--左侧导航部分-->
    <ul>
        <li ><a href="/admin/index/{{.tel}}"><span class="icon">&#128711;</span> 设备监控</a></li>
        <li><a href=/admin/admin_list/{{.tel}}><span class="icon">&#128101;</span> 管理员 </a></li>
        <li>
            <a href="/admin/sys_setting/{{.tel}}"><span class="icon">&#9881;</span>系统设置</a>
        </li>
        <li>
            <a href="/admin/show_remote_list/{{.tel}}"><span class="icon">&#9881;</span>显示遥控数据</a>
        </li>
        <li class="section">
            <a href="/admin/add_remote_data/{{.tel}}"><span class="icon">&#9881;</span>添加遥控数据</a>
        </li>
    </ul>
</nav>
<!-- 页面具体内容-->
<section class="topcontent">
<section class="widget">
<header>
    <span class="icon">&#128200;</span>
    <hgroup>
        <h1>基本信息</h1>
    </hgroup>
    <aside>
        <button id="submit_btn" type="button">提交</button>
    </aside>
</header>
<section class="widget1">
<!--<div class="div_left">
</div>-->
<div class="user_form_class">
<br>
<div id="ziti1"><center> 用户空调数据</center></div>
<br>
<table border="1">
    <tr>
        <td>
            <center>
                <div class="input_tag">遥控器的名字</div>
            </center>
        </td>
        <td><input type="text" class=text id="RemoteName"></td>
        <td><pre></pre></td>
        <td>
            <center>
                <div class="input_tag">编号</div>
            </center>
        </td>
        <td><input type="text"  class=text id="No">           
        </td>
    </tr>
    <tr>
        <td>
            <center>
                <div class="input_tag">版本号</div>
            </center>
        </td>
        <td>
            <input type="text" class=text id="Version">
        </td>
        <td><pre>                                        </pre></td>
        <td>
            <center><div class="input_tag">设备型号</div></center>
        </td>
        <td>
            <input type="text" class=text id="DeviceType">
		</td>
		<td>
			<label id="DeviceTypeLabel" style="display:none;color:red">请输入正确的型号</label>
        </td>
    </tr>
    <tr>
        <td>
            <center><div class="input_tag">载波频率</div></center>
        </td>
        <td>
            <input type="text" class=text id="IRFRQ">
        </td>
		<td>
			<label id="IRFRQLabel" style="display:none;color:red">请输入正确的频率</label>
        </td>
        <td>
            <center><div class="input_tag">采样脉冲宽度</div></center>
        </td>
        <td><input type="text" class=text id="TimeScale"></td>
		<td>
			<label id="TimeScaleLabel" style="display:none;color:red">请输入正确的宽度</label>
        </td>
    </tr>
    <tr>
        <td>
            <center>
                <div class="input_tag">关机码字</div>
            </center>
        </td>
        <td><input type="text" class=text id="PoweroffCode"></td>
</tr>
<tr>
        <td><center><div class="input_tag">开机码字</div></center></td>
        <td><input type="text" class=text id="BootCode"></td>
    </tr>
</table>
<!--页面Accode格式内容-->
<div id="ziti2">Accode格式</div>
<br>
<div id="temperature_array">
    <div>

    </div>
    <p>温度数据</p>
    <button id="add_tempture_btn">添加框</button>      <!--温度手动添加框-->
</div>
<br>
<table border="1">

       <tr>
            <td>
                <center>
                    <div class="form_tag">温度起始</div>
                </center>
            </td>
            <td><input type="text" class="TemptureModel" id="TempSart"></td>
            <td><pre></pre></td>
            <td>
                <center>
                    <div class="form_tag">温度码字长度</div>
                </center>
            </td>
            <td>
                <input type="text"  class="TemptureModel" id="TempBitLen">
            </td>
    </tr>
    <tr>
        <td><center><div id="model">模式</div></center></td><td><center><div class="form_tag">开始的位数</div></center></td><td><center><div class="form_tag">码值</div></center></td><td><center><div class="form_tag">位宽</div></center></td>
    </tr>
    <tr>
        <td>
            <center>
                <div id="WindAutoModel_TAG">风速自动模式</div>
            </center>
        </td>
        <div class="WindAutoModel">
            <td><center><input type="text"  class="WindAutoModel StartAddr"/></center></td>
            <td><center><input type="text"  class="WindAutoModel Code"/></center></td>
            <td><center><input type="text"  class="WindAutoModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="WindAutoModelStartAddrLabel" style="display:none;color:red;"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="WindAutoModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="WindHighModel_TAG">风速高模式</div>
            </center>
        </td>
        <div class="WindHighModel">
            <td><center><input type="text" class="WindHighModel StartAddr"></center></td>
            <td><center><input type="text" class="WindHighModel Code"></center></td>
            <td><center><input type="text" class="WindHighModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="WindHighModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="WindHighModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="WindMidModel_TAG">风速中模式</div>
            </center>
        </td>
        <div class="WindMidModel">
            <td><center><input type="text" class="WindMidModel StartAddr"></center></td>
            <td><center><input type="text"  class="WindMidModel Code"></center></td>
            <td><center><input type="text"  class="WindMidModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="WindMidModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="WindMidModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="WindLowModel_TAG">风速低模式</div>
            </center>
        </td>
        <div class="WindLowModel">
            <td><center><input type="text" class="WindLowModel StartAddr"></center></td>
            <td><center><input type="text" class="WindLowModel Code"></center></td>
            <td><center><input type="text" class="WindLowModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="WindLowModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="WindLowModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="HotModel_TAG">制热模式</div>
            </center>
        </td>
        <div class="HotModel">
            <td><center><input type="text" class="HotModel StartAddr"></center></td>
            <td><center><input type="text" class="HotModel Code"></center></td>
            <td><center><input type="text" class="HotModel BitLength"></center></td>
        </div>
	</tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="HotModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="HotModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="CodeModel_TAG">制冷模式</div>
            </center>
        </td>
        <div class="CodeModel">
            <td><center><input type="text" class="CodeModel StartAddr"></center></td>
            <td><center><input type="text" class="CodeModel Code"></center></td>
            <td><center><input type="text" class="CodeModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="CodeModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="CodeModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="VentilateModel_TAG">通风模式</div>
            </center>
        </td>
        <div class="VentilateModel">
            <td><center><input type="text" class="VentilateModel StartAddr"></center></td>
            <td><center><input type="text" class="VentilateModel Code"></center></td>
            <td><center><input type="text" class="VentilateModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="VentilateModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="VentilateModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="DehumidifyModel_TAG">除湿模式</div>
            </center>
        </td>
        <div class="DehumidifyModel">
            <td><center><input type="text" class="DehumidifyModel StartAddr"></center></td>
            <td><center><input type="text" class="DehumidifyModel Code"></center></td>
            <td><center><input type="text" class="DehumidifyModel BitLength"></center></td>
        </div>
    </tr>
	<tr>
		<td>
		</td>
		<td>
			<label id="DehumidifyModelStartAddrLabel" style="display:none;color:red"><center>请输入正确的位数</center></label>
        </td>
		<td>
        </td>
		<td>
			<label id="DehumidifyModelBitLengthLabel" style="display:none;color:red"><center>请输入正确的位宽</center></label>
        </td>
	</tr>
    <tr>
        <td>
            <center>
                <div id="DefaultCode_TAG">编码模板</div>
            </center>
        </td>
        <td><center><input type="text" class=text id="DefaultCode"></center></td>
    </tr>
</table>
</div>
</section>
</section>
</section>
</body>




<script>

    $(document).ready(function(){
        var json_data = {
            "ObjectId": "54b2a63ee3606611c8000001",
            "RemoteName": "",
            "No": "",
            "Version": "",
            "DeviceType": 0,
            "Descript": "",
            "SaveUrl": "",
            "User": 1,
            "UpdateTime": "0001-01-01T00:00:00Z",
            "TimeScale": 0,
            "IRFRQ": 0,
            "BootCode": "0x010x020x03",
            "PoweroffCode": "",
            "AcCode":{
                "TemperatureData": [],
                "TempSart":0,
	            "TempBitLen":0,
                "WindAutoModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "WindHighModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "WindMidModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "WindLowModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "HotModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "CodeModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "VentilateModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "DehumidifyModel": {
                    "StartAddr": 0,
                    "Code": 0,
                    "BitLength": 0
                },
                "DefaultCode": ""
            },
            "CommonCode":[{"key":"test","Value":"test"}]

        }
//手动添加温度数据输入框
        console.log(json_data);
        commoncpoe_id=0;
        accode_id=0;
        $("#add_tempture_btn").click(function(){
            $("p").append('<input type="text" id="id_"+accode_id'+ "class=text>");
            accode_id++;
        });
//判断输入框数据类型是否为int型
	   //设备型号的判断
        var DeviceTypeFlag=0;
        $("#DeviceType").focus(function () {
             DeviceTypeFlag = 0;
            $("#DeviceTypeLabel").hide();
        });

        $("#DeviceType").blur(function () {
            var DeviceTypeFlag=0;
            var a = $("#DeviceType").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#DeviceTypeLabel").show();
                DeviceTypeFlag=1;
            }
        });
		
		//载波频率的判断
		var IRFRQFlag=0;
        $("#IRFRQ").focus(function () {
             IRFRQFlag = 0;
            $("#IRFRQLabel").hide();
        });

        $("#IRFRQ").blur(function () {
            var IRFRQFlag=0;
            var a = $("#IRFRQ").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#IRFRQLabel").show();
                IRFRQFlag=1
            }
        });
	   //采样脉冲宽度的判断
	     var TimeScaleFlag=0;
        $("#TimeScale").focus(function () {
             TimeScaleFlag = 0;
            $("#TimeScaleLabel").hide();
        });
		
        $("#TimeScale").blur(function () {
            var TimeScaleFlag=0;
            var a = $("#TimeScale").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#TimeScaleLabel").show();
                TimeScaleFlag=1;
            }
        });

		//风速自动模式开始位数的判断
		var WindAutoModelStartAddrFlag=0;
        $(".WindAutoModel.StartAddr").focus(function () {
             WindAutoModelStartAddrFlag = 0;
            $("#WindAutoModelStartAddrLabel").hide();
        });

        $(".WindAutoModel.StartAddr").blur(function () {
            var WindAutoModelStartAddrFlag=0;
            var a = $(".WindAutoModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindAutoModelStartAddrLabel").show();
                WindAutoModelStartAddrFlag=1
            }
        });

		//风速自动模式位宽的判断
		var WindAutoModelBitLengthFlag=0;
        $(".WindAutoModel.BitLength").focus(function () {
             WindAutoModelBitLengthFlag = 0;
            $("#WindAutoModelBitLengthLabel").hide();
        });

        $(".WindAutoModel.BitLength").blur(function () {
            var WindAutoModelBitLengthFlag=0;
            var a = $(".WindAutoModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindAutoModelBitLengthLabel").show();
                WindAutoModelBitLengthFlag=1
            }
        });
		
		//风速高模式开始位数的判断
		var WindHighModelStartAddrFlag=0;
        $(".WindHighModel.StartAddr").focus(function () {
             WindHighModelStartAddrFlag = 0;
            $("#WindHighModelStartAddrLabel").hide();
        });

        $(".WindHighModel.StartAddr").blur(function () {
            var WindHighModelStartAddrFlag=0;
            var a = $(".WindHighModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindHighModelStartAddrLabel").show();
                WindHighModelStartAddrFlag=1
            }
        });

		//风速高模式位宽的判断
		var WindHighModelBitLengthFlag=0;
        $(".WindHighModel.BitLength").focus(function () {
             WindHighModelBitLengthFlag = 0;
            $("#WindHighModelBitLengthLabel").hide();
        });

        $(".WindHighModel.BitLength").blur(function () {
            var WindHighModelBitLengthFlag=0;
            var a = $(".WindHighModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindHighModelBitLengthLabel").show();
                WindHighModelBitLengthFlag=1
            }
        });
		
		//风速中模式开始位数的判断
		var WindMidModelStartAddrFlag=0;
        $(".WindMidModel.StartAddr").focus(function () {
             WindMidModelStartAddrFlag = 0;
            $("#WindMidModelStartAddrLabel").hide();
        });

        $(".WindMidModel.StartAddr").blur(function () {
            var WindMidModelStartAddrFlag=0;
            var a = $(".WindMidModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindMidModelStartAddrLabel").show();
                WindMidModelStartAddrFlag=1
            }
        });

		//风速中模式位宽的判断
		var WindMidModelBitLengthFlag=0;
        $(".WindMidModel.BitLength").focus(function () {
             WindMidModelBitLengthFlag = 0;
            $("#WindMidModelBitLengthLabel").hide();
        });

        $(".WindMidModel.BitLength").blur(function () {
            var WindMidModelBitLengthFlag=0;
            var a = $(".WindMidModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindMidModelBitLengthLabel").show();
                WindMidModelBitLengthFlag=1
            }
        });

		//风速低模式开始位数的判断
		var WindLowModelStartAddrFlag=0;
        $(".WindLowModel.StartAddr").focus(function () {
             WindLowModelStartAddrFlag = 0;
            $("#WindLowModelStartAddrLabel").hide();
        });

        $(".WindLowModel.StartAddr").blur(function () {
            var WindLowModelStartAddrFlag=0;
            var a = $(".WindLowModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindLowModelStartAddrLabel").show();
                WindLowModelStartAddrFlag=1
            }
        });

		//风速低模式位宽的判断
		var WindLowModelBitLengthFlag=0;
        $(".WindLowModel.BitLength").focus(function () {
             WindLowModelBitLengthFlag = 0;
            $("#WindLowModelBitLengthLabel").hide();
        });

        $(".WindLowModel.BitLength").blur(function () {
            var WindLowModelBitLengthFlag=0;
            var a = $(".WindLowModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#WindLowModelBitLengthLabel").show();
                WindLowModelBitLengthFlag=1
            }
        });

		//制热模式开始位数的判断
		var HotModelStartAddrFlag=0;
        $(".HotModel.StartAddr").focus(function () {
             HotModelStartAddrFlag = 0;
            $("#HotModelStartAddrLabel").hide();
        });

        $(".HotModel.StartAddr").blur(function () {
            var HotModelStartAddrFlag=0;
            var a = $(".HotModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#HotModelStartAddrLabel").show();
                HotModelStartAddrFlag=1
            }
        });

		//制热模式位宽的判断
		var HotModelBitLengthFlag=0;
        $(".HotModel.BitLength").focus(function () {
             HotModelBitLengthFlag = 0;
            $("#HotModelBitLengthLabel").hide();
        });

        $(".HotModel.BitLength").blur(function () {
            var HotModelBitLengthFlag=0;
            var a = $(".HotModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#HotModelBitLengthLabel").show();
                HotModelBitLengthFlag=1
            }
        });

		//制冷模式开始位数的判断
		var CodeModelStartAddrFlag=0;
        $(".CodeModel.StartAddr").focus(function () {
             CodeModelStartAddrFlag = 0;
            $("#CodeModelStartAddrLabel").hide();
        });

        $(".CodeModel.StartAddr").blur(function () {
            var CodeModelStartAddrFlag=0;
            var a = $(".CodeModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#CodeModelStartAddrLabel").show();
                CodeModelStartAddrFlag=1
            }
        });

		//制冷模式位宽的判断
		var CodeModelBitLengthFlag=0;
        $(".CodeModel.BitLength").focus(function () {
             CodeModelBitLengthFlag = 0;
            $("#CodeModelBitLengthLabel").hide();
        });

        $(".CodeModel.BitLength").blur(function () {
            var CodeModelBitLengthFlag=0;
            var a = $(".CodeModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#CodeModelBitLengthLabel").show();
                CodeModelBitLengthFlag=1
            }
        });

		//通风模式开始位数的判断
		var VentilateModelStartAddrFlag=0;
        $(".VentilateModel.StartAddr").focus(function () {
             VentilateModelStartAddrFlag = 0;
            $("#VentilateModelStartAddrLabel").hide();
        });

        $(".VentilateModel.StartAddr").blur(function () {
            var VentilateModelStartAddrFlag=0;
            var a = $(".VentilateModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#VentilateModelStartAddrLabel").show();
                VentilateModelStartAddrFlag=1
            }
        });

		//通风模式位宽的判断
		var VentilateModelBitLengthFlag=0;
        $(".VentilateModel.BitLength").focus(function () {
             VentilateModelBitLengthFlag = 0;
            $("#VentilateModelBitLengthLabel").hide();
        });

        $(".VentilateModel.BitLength").blur(function () {
            var VentilateModelBitLengthFlag=0;
            var a = $(".VentilateModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#VentilateModelBitLengthLabel").show();
                VentilateModelBitLengthFlag=1
            }
        });

		//除湿模式开始位数的判断
		var DehumidifyModelStartAddrFlag=0;
        $(".DehumidifyModel.StartAddr").focus(function () {
             DehumidifyModelStartAddrFlag = 0;
            $("#DehumidifyModelStartAddrLabel").hide();
        });

        $(".DehumidifyModel.StartAddr").blur(function () {
            var DehumidifyModelStartAddrFlag=0;
            var a = $(".DehumidifyModel.StartAddr").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#DehumidifyModelStartAddrLabel").show();
                DehumidifyModelStartAddrFlag=1
            }
        });

		//除湿模式位宽的判断
		var DehumidifyModelBitLengthFlag=0;
        $(".DehumidifyModel.BitLength").focus(function () {
             DehumidifyModelBitLengthFlag = 0;
            $("#DehumidifyModelBitLengthLabel").hide();
        });

        $(".DehumidifyModel.BitLength").blur(function () {
            var DehumidifyModelBitLengthFlag=0;
            var a = $(".DehumidifyModel.BitLength").val();
            if (!/^[0-9]*$/.test(a)) {
                 
                $("#DehumidifyModelBitLengthLabel").show();
               DehumidifyModelBitLengthFlag=1
            }
        });

//json取输入框数据        
        $("#submit_btn").click(function () {
            console.log($(".WindAutoModel.StartAddr").val());
            json_data.RemoteName=$("#RemoteName").val();
            json_data.No=$("#No").val();
            json_data.Version=$("#Version").val();
            json_data.DeviceType=parseInt($("#DeviceType").val());
            //json_data.SaveUrl=$("#SaveUrl").val();
            //json_data.User=parseInt($("#User").val());
            //json_data.UpdateTime=$("#UpdateTime").val();
            json_data.TimeScale=parseInt($("#TimeScale").val());
            json_data.IRFRQ=parseInt($("#IRFRQ").val());
            json_data.BootCode=$("#BootCode").val();
            json_data.PoweroffCode=$("#PoweroffCode").val();
            json_data.AcCode.TempSart = parseInt($("#TempSart").val());
            json_data.AcCode.TempBitLen = parseInt($("#TempBitLen").val());
            json_data.AcCode.WindAutoModel.StartAddr=parseInt($(".WindAutoModel.StartAddr").val());
            json_data.AcCode.WindAutoModel.Code=$(".WindAutoModel.Code").val();
            json_data.AcCode.WindAutoModel.BitLength=parseInt($(".WindAutoModel.BitLength").val());
            json_data.AcCode.WindHighModel.StartAddr=parseInt($(".WindHighModel.StartAddr").val());
            json_data.AcCode.WindHighModel.Code=$(".WindHighModel.Code").val();
            json_data.AcCode.WindHighModel.BitLength=parseInt($(".WindHighModel.BitLength").val());
            json_data.AcCode.WindMidModel.StartAddr=parseInt($(".WindMidModel.StartAddr").val());
            json_data.AcCode.WindMidModel.Code=$(".WindMidModel.Code").val();
            json_data.AcCode.WindMidModel.BitLength=parseInt($(".WindMidModel.BitLength").val());
            json_data.AcCode.WindLowModel.StartAddr=parseInt($(".WindLowModel.StartAddr").val());
            json_data.AcCode.WindLowModel.Code=$(".WindLowModel.Code").val();
            json_data.AcCode.WindLowModel.BitLength=parseInt($(".WindLowModel.BitLength").val());
            json_data.AcCode.HotModel.StartAddr=parseInt($(".HotModel.StartAddr").val());
            json_data.AcCode.HotModel.Code=$(".HotModel.Code").val();
            json_data.AcCode.HotModel.BitLength=parseInt($(".HotModel.BitLength").val());
            json_data.AcCode.CodeModel.StartAddr=parseInt($(".CodeModel.StartAddr").val());
            json_data.AcCode.CodeModel.Code=$(".CodeModel.Code").val();
            json_data.AcCode.CodeModel.BitLength=parseInt($(".CodeModel.BitLength").val());
            json_data.AcCode.VentilateModel.StartAddr=parseInt($(".VentilateModel.StartAddr").val());
            json_data.AcCode.VentilateModel.Code=$(".VentilateModel.Code").val();
            json_data.AcCode.VentilateModel.BitLength=parseInt($(".VentilateModel.BitLength").val());
            json_data.AcCode.DehumidifyModel.StartAddr=parseInt($(".DehumidifyModel.StartAddr").val());
            json_data.AcCode.DehumidifyModel.Code=$(".DehumidifyModel.Code").val();
            json_data.AcCode.DehumidifyModel.BitLength=parseInt($(".DehumidifyModel.BitLength").val());
            json_data.AcCode.DefaultCode=$("#DefaultCode").val();
            var aa= $("input[id^='id_']");
            console.log(json_data);
            for(var i=0;i<aa.length;i++)
            {
                json_data.AcCode.TemperatureData.push(aa[i].value);
            }
 
 
            $.ajax({
                type:"POST",
                url:"http://localhost:8080/admin/api/add_remote_data/{{.tel}}",
                data:JSON.stringify(json_data),
                datatype:"json",
                success:function(data){
                    if(data.RespCode == 200){
                        alert(data.Msg);
                    }else{
                        alert(data.Msg);
                    }
                }
            });
        });


    });
</script>
</html>